Leinonen

Code, Mindfulness & Minimalism

Posts tagged with "custom unmarshallers"

Found 1 post.

Custom Unmarshallers in Go: Parsing Data Your Way

By Peter Leinonen on September 21, 2025

Discover how to leverage custom unmarshallers in Go to handle complex real-world data parsing challenges. This blog post explores the use of Go's json.Unmarshaler interface to transform inconsistent API data into clean, type-safe structures. Learn how to convert string values to enums, manage nested JSON objects, and implement validation directly in the unmarshalling process. With tips on performance, error handling, and testing, this guide helps you maintain clean and efficient code while managing messy external data formats. Perfect for developers looking to streamline data transformation in Go applications.

Read more